package com.bc.bcupload.common;

public enum AdType {
	
	A("A", 1920, 440),
	B("B", 240, 100),
	C("C", 230, 140),
	D("D", 230, 140),
	E("E", 1920, 100),
	F("F", 750, 387),
	G("G", 496, 302),
	H("H", 240, 200),
	I("I", 1200, 400),
	J("J", 900, 400),
	DEFAULT("0", 0, 0);
	
	private String value; 	//广告类型
	private int width; 		//宽度
	private int height;		//高度
	
	private AdType(String value, int width, int height){
		this.value = value;
		this.width = width;
		this.height = height;
	}

	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public int getWidth() {
		return width;
	}
	public void setWidth(int width) {
		this.width = width;
	}
	public int getHeight() {
		return height;
	}
	public void setHeight(int height) {
		this.height = height;
	}
	
	public static AdType getEnum(String value){
		if(value == null){
			return null;
		}
		for(AdType at : AdType.values()){
			if(at.getValue().equals(value)){
				return at;
			}
		}
		return null;
	}
}
